class DebugTrace(object):
    def __init__(self,name,startLevel=1):
        self.debugLevel=startLevel
        self.moduleName=name

    def trace(self,tracelevel,message):
        if tracelevel<=self.debugLevel:
            print self.moduleName+": "+message

    def setDebugLevel(self,level):
        self.debugLevel=level
